package com.appapi.common;

public class ApiRe {
    int code =0;
    String msg = null;
    Object data =null;

    public ApiRe(){
        this.code = 200;
        this.msg = "成功";
        this.data = new ResultData();
    }

    public ApiRe(int error){
        if(error==0){
            this.code = 401;
            this.msg = "请先登录！";
            this.data = new ResultData();
        }else{
            this.code = 400;
            this.msg = "系统异常，请联系管理员！";
            this.data = new ResultData();
        }

    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }
}

class ResultData{

}